3 ...\PTVR_Researchers\Python_Scripts\Demos\Interactions_events_callbacks\quit_PTVR.py
5 Goal : This demo shows how the 'quit' callback allows you to instantaneously quit PTVR.exe.
7 In the particular case of this script, this callback is triggered by pressing
8 the space bar (a keyboard event)
10 Created on : Thu Jan 13 15:09:02 2022
24 my_world = visual.The3DWorld ()
27 my_event = event.Keyboard (valid_responses = [
'space'])
28 my_callback = callback.Quit()
30 my_scene.AddInteraction (events= [my_event], callbacks =[my_callback] )
34 position_in_current_CS = np.array([0.0,1.2,1.0]),visual_angle_of_centered_x_height_deg=1.0,
35 vertical_alignment=
"baseline")
36 my_scene.place (my_text_press,my_world)
38 my_world.add_scene (my_scene)
42 if __name__ ==
"__main__":
def LaunchThe3DWorld(jsonFileCategory="Externals")